package com.tobeface.sns.infrastructure.persist;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.mongodb.core.MongoOperations;

import com.kissme.lang.Preconditions;

/**
 * 
 * @author loudyn
 * 
 */
public abstract class MongoRepositorySupport {

	private final Logger logger = LoggerFactory.getLogger(getClass());
	private final MongoOperations mongoOperations;

	/**
	 * 
	 * @param mongoOperations
	 */

	protected MongoRepositorySupport(MongoOperations mongoOperations) {
		Preconditions.notNull(mongoOperations);
		this.mongoOperations = mongoOperations;
	}

	/**
	 * 
	 * @return
	 */
	protected final MongoOperations getMongoOperations() {
		return mongoOperations;
	}

	/**
	 * 
	 * @return
	 */
	protected final Logger getLogger() {
		return logger;
	}
}
